1. Field of the Invention
The present invention relates to a method of estimating and compensating for motion in image encoding and decoding, and more particularly, to a method of estimating and compensating for motion when a current block refers to a region that is outside a reference frame by using a motion vector in image encoding and decoding.
2. Description of the Related Art
Video codecs such as H.263, Moving Picture Experts Group 2 (MPEG 2), MPEG 4, H.264/Advanced Video Coding (AVC), etc. use correlation between frames, perform a method of estimating and compensating for motion, and thereby increase compression efficiency, even when motion of an object appears in an image.
The method of estimating and compensating for motion refers to a reference block of a reference frame to reconstruct a block of a current frame. However, a part of the reference block determined by a motion vector may be outside the reference frame. The conventional video codecs such as H.263, MPEG 2, MPEG 4, H.264/AVC, etc. extend an outside region of the reference frame by using boundary pixels of the reference frame, and thereby estimate the part of the reference block which is outside the reference frame.
FIG. 1 is a diagram of a conventional method of estimating and compensating for motion when a reference block is outside a reference frame.
A current block 120 of a current frame 110 refers to a reference block 160 of a reference frame 150 by a motion vector. A region 170 included in the reference frame 150 is inserted into an equivalent region 130 of the current block 120. However, when a part 180 of the reference block 160 is outside the reference frame 150, an equivalent region 140 of the current block 120 referring to the part 180 that is outside the reference frame 150 is padded with pixel values of boundary pixels 190 of the reference frame 150. This conventional technique is known as a padding method.
When motion occurs in an outside region of a frame, compression efficiency of a block which refers to the outside of the frame by using the conventional simple padding method is decreased. In particular, compression efficiency of an active image sequence having panning, tilting, zooming in/out, fast camera motion, and fast object motion is greatly decreased.
The conventional padding method extends an outside region of a frame prior to performing a method of compensating for motion, and as such only limited information is used in the padding method. Thus, a region that is related to motion and is outside the frame is not accurately estimated.